
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-iconfontadd"></use>
                    </svg>
                    <div class="name">加号</div>
                    <div class="fontclass">#ibsp-iconfontadd</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-iconfontmove"></use>
                    </svg>
                    <div class="name">减号</div>
                    <div class="fontclass">#ibsp-iconfontmove</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-shizhong"></use>
                    </svg>
                    <div class="name">时钟</div>
                    <div class="fontclass">#ibsp-shizhong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-calendar"></use>
                    </svg>
                    <div class="name">日历</div>
                    <div class="fontclass">#ibsp-calendar</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-shuaxin"></use>
                    </svg>
                    <div class="name">刷新</div>
                    <div class="fontclass">#ibsp-shuaxin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-chaxun"></use>
                    </svg>
                    <div class="name">查询</div>
                    <div class="fontclass">#ibsp-chaxun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-log-theme"></use>
                    </svg>
                    <div class="name">日志主题管理</div>
                    <div class="fontclass">#ibsp-log-theme</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-alarm-statistics"></use>
                    </svg>
                    <div class="name">报警统计</div>
                    <div class="fontclass">#ibsp-alarm-statistics</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-modify-password"></use>
                    </svg>
                    <div class="name">修改密码</div>
                    <div class="fontclass">#ibsp-modify-password</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-system-extension"></use>
                    </svg>
                    <div class="name">系统扩展管理</div>
                    <div class="fontclass">#ibsp-system-extension</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-for-help"></use>
                    </svg>
                    <div class="name">求助分组管理</div>
                    <div class="fontclass">#ibsp-for-help</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-real-time-alarm"></use>
                    </svg>
                    <div class="name">实时报警</div>
                    <div class="fontclass">#ibsp-real-time-alarm</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-basic-information"></use>
                    </svg>
                    <div class="name">基本信息</div>
                    <div class="fontclass">#ibsp-basic-information</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-subscription"></use>
                    </svg>
                    <div class="name">订阅管理</div>
                    <div class="fontclass">#ibsp-subscription</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-history-alarm"></use>
                    </svg>
                    <div class="name">历史报警</div>
                    <div class="fontclass">#ibsp-history-alarm</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-personality-settings"></use>
                    </svg>
                    <div class="name">个性设置</div>
                    <div class="fontclass">#ibsp-personality-settings</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-page-management"></use>
                    </svg>
                    <div class="name">页面管理</div>
                    <div class="fontclass">#ibsp-page-management</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-inquiry"></use>
                    </svg>
                    <div class="name">自由查询</div>
                    <div class="fontclass">#ibsp-inquiry</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-group"></use>
                    </svg>
                    <div class="name">团队</div>
                    <div class="fontclass">#ibsp-group</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-maintain"></use>
                    </svg>
                    <div class="name">作业组维护</div>
                    <div class="fontclass">#ibsp-maintain</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-personal"></use>
                    </svg>
                    <div class="name">个人</div>
                    <div class="fontclass">#ibsp-personal</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-network-management"></use>
                    </svg>
                    <div class="name">网络管理</div>
                    <div class="fontclass">#ibsp-network-management</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-generator-room"></use>
                    </svg>
                    <div class="name">机房动环</div>
                    <div class="fontclass">#ibsp-generator-room</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-video-surveillance"></use>
                    </svg>
                    <div class="name">视频监控</div>
                    <div class="fontclass">#ibsp-video-surveillance</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-building-automation"></use>
                    </svg>
                    <div class="name">楼宇自控</div>
                    <div class="fontclass">#ibsp-building-automation</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-burglar-alarm"></use>
                    </svg>
                    <div class="name">防盗报警</div>
                    <div class="fontclass">#ibsp-burglar-alarm</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-lighting"></use>
                    </svg>
                    <div class="name">智能照明</div>
                    <div class="fontclass">#ibsp-lighting</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-information-delivery"></use>
                    </svg>
                    <div class="name">信息发布</div>
                    <div class="fontclass">#ibsp-information-delivery</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-cabinet-settings"></use>
                    </svg>
                    <div class="name">机柜设置</div>
                    <div class="fontclass">#ibsp-cabinet-settings</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-notifications"></use>
                    </svg>
                    <div class="name">通知管理</div>
                    <div class="fontclass">#ibsp-notifications</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-task-plan"></use>
                    </svg>
                    <div class="name">任务计划</div>
                    <div class="fontclass">#ibsp-task-plan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-icon-elements"></use>
                    </svg>
                    <div class="name">图标元素</div>
                    <div class="fontclass">#ibsp-icon-elements</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-rank"></use>
                    </svg>
                    <div class="name">例外等级</div>
                    <div class="fontclass">#ibsp-rank</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-login-settings"></use>
                    </svg>
                    <div class="name">登录设置</div>
                    <div class="fontclass">#ibsp-login-settings</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-equipments"></use>
                    </svg>
                    <div class="name">设备占比</div>
                    <div class="fontclass">#ibsp-equipments</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#ibsp-service-directory"></use>
                    </svg>
                    <div class="name">服务目录</div>
                    <div class="fontclass">#ibsp-service-directory</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#ibsp-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
